﻿using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WeiXin
{
    public class ChatMessage
    {
        public string ID
        {
            get; set;
        }
        /// <summary>
        /// 消息类型
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public MType mType
        {
            get; set;
        }
        /// <summary>
        /// 接收方ID，可以是用户ID或者是群ID
        /// </summary>
        public string mUser
        {
            get; set;
        }
        /// <summary>
        /// 消息内容
        /// </summary>
        public string mMessage
        {
            get; set;
        }

        public string MsgId
        {
            get; set;
        }

        public string FilePath
        {
            get;set;
        }

        public int Width
        {
            get;set;
        }

        public int Height
        {
            get;set;
        }
    }
    public class ChatResult
    {
        public string ID
        {
            get; set;
        }
        public bool State
        {
            get; set;
        }
    }
    public enum MType : short
    {
        Text = 1,
        Image = 2,
        GIF = 3,
        File = 4,
        Video = 5,
        WebImage = 6,
        WebVideo = 7
    }
}
